0. System Requirement This application should run on any configuration of Mac SE/30, II, IIx, IIcx or IIci. This version is complied to use the math co-processor. Set the monitor (from the Control Panel) to display the maximum number of colors. People with grey-scale monitors should try out both the "colors" and "grays" settings in the Control Panel. For people with black and white monitors (SE/30), only the cube object will look acceptable in flat-shading. Choose wireframe mode for the other objects. Both applications use the math co-processor and Color QuickDraw. They will not work on the Mac Plus, SE or Portable (yet). 1. Introduction This application demonstrates five "virtual controllers" for use in rotating three-dimensional (3D) objects with the mouse. The virtual controllers are described in more detail in the paper "A Study in Interactive 3-D Rotation Using 2-D Control Devices" by Michael Chen, S. Joy Mountford and Abigail Sellen published in the ACM Siggraph '88 proceedings (Volume 22, Number 4, August 1988). There is also a companion Macintosh application that implements a version of the rotation experiment described in the Siggraph paper. 2. Description of Virtual Rotational Controllers Rotations are done with respect to the screen's (camera's) frame of reference, with the x-axis pointing to the right, y-axis pointing upward and z-axis pointing at the user. So, rotations in x, y and z correspond to rotating the object up-and-down, left-and-right and clockwise-counter-clockwise, respectively. 2.1. Graphical Sliders Controller The Graphical Sliders controller uses a traditional approach to allow the user to perform 3-D rotations. The sliders simulate "treadmills" and therefore provide relative control over the amount of rotation. A full sweep across a slider provides 180 degrees of rotation about an independent axis. As long as the mouse button is initially depressed inside one slider, the user can rotate about the corresponding axis even if accidentally crossing into another slider. 2.2. Overlapping Sliders Controller The Overlapping Sliders controller is a modification of the conventional slider approach. The three squares in the middle column of the 9-square grid represent a vertical (x) slider. The three squares in the middle row represent a horizontal (y) slider. The outside eight squares represent a circular (z) slider. A full sweep of the vertical or horizontal slider rotates the object 180 degrees about the x or y axis respectively. A full circle around the outside squares rotates the object 360 degrees about z. Note that only near vertical, horizontal and circular movement of the mouse inside the middle column, middle row and outside squares (respectively) are recognized by this controller. A diagonal movement in the middle square, for example, is ignored since this would be a coupled rotation in x and y (i.e. the rotation axis lying somewhere on the x-y plane). Thus, this controller still operates on the basis of single axis control. The difference between this controller and conventional sliders, though, is increased controller-display compatibility. The direction of movement of the mouse more closely corresponds with the direction of rotation. In addition, superimposing the controller on the object is intended to give the user more of a sense of directly manipulating the object. 2.3. Continuous XY with Additional Z Controller The Continuous XY with added Z controller operates in two modes. If the mouse button is depressed while the mouse cursor is inside the circle, left-and-right and up-and-down movement of the mouse will rotate the object left-and right and up-and-down on the screen. Diagonal movement will rotate the object the proportional amount about the x and y-axis ( i.e. the axis of rotation is on the x-y plane and is perpendicular to the direction of mouse movement). If the mouse button is depressed while the mouse cursor is outside the circle, the user can rotate the whole object clockwise by going around the outside of the circle. Thus this controller provides either 1) continuous rotation on the x-y plane, or 2) exact rotation about the z-axis. A full sweep of the mouse across the circle rotates the object 180 degrees about the corresponding axis in the x-y plane. A full circle around the outside rotates the object 360 degrees about z. 2.4. Virtual Sphere Controller The virtual sphere controller simulates the mechanics of a physical 3-D trackball that can freely rotate about any arbitrary axis in 3-space. On the display screen, the user can imagine viewing an object encased in a glass sphere. Rotation is then a matter of rolling the sphere and therefore the object with the mouse cursor. Up-and-down and left-and-right movement at the centre of the circle is equivalent to "rolling" the imaginary sphere at its apex and produces rotation about the x and y-axis respectively. Movement along (or completely outside) the edge of the circle is equivalent to rolling the sphere at the edge and produces rotation about z. The amount of rotation is adjusted so that a full sweep of the mouse across the circle rotates the object 180 degrees about the corresponding axis in the x-y plane; a full circle around the outside rotates the object 360 degrees about z. The difference between this and the Continuous XY with additional Z is that the Virtual Sphere allows continuous rotation about all three axes inside the circle while the latter only allows continuous control of two axes inside. To rotate in z, the user must go outside the circle. 2.5 Evans, Tanner & Wein Controller The Evans et al. technique is a combination of the "two-axis trackball" and the "stirrer" techniques they described in their paper [ACM Siggraph '81 Proceedings, Vol. 15, #3, Aug 81]. Their implementation recognizes straight line (continuous rotation in x and y) and circular (rotation in z) gestures. To detect the different motions, a "stirring angle" is calculated based on the change in movement of the last three positions of the input device. This value is then compared to a threshold to decide whether the movement is in a "relatively" straight-line or not. The threshold, unfortunately, is dependent on two interrelated variables: the speed with which each individual user likes to draw the circle and the frequency of reading of the input device. If the sampling rate is too fast or the user prefers to draw the circle slowly, the three readings would tend to indicate that a straight line is drawn. Thus, threshold adjustments may be needed for different systems and different users with this technique. This application contains a dialog box that allows the threshold parameters to be adjusted (see below). 3. Using This Application The applications starts up with the five virtual controllers displayed in separate windows. Each window can display one of four objects: a cube, an icosahedron, a house and a Mac II. Change the object by selecting from the "Objects" menu. The "Options" menu lets you toggle between wireframe / flat-shading, and enabling / disabling backfaced polygon removal and double buffering. The "Controller" menu lets you zoom out a particular virtual controller window to full screen, re-tile all the windows to their default locations, and change the parameters for the Evans, Tanner & Wein controller. The parameters that can be changed in the Evans, Tanner & Wein Controller Setup dialog are: "Pixel movement threshold": the amount of mouse movement before it is considered a real movement for the controller. "Stirring angle threshold:" the minimum stirring angle before rotation is switched form x-y to z. "X-Y rotation scaling:" the scaling factor used if in x-y rotation mode. "Z rotation scaling:" the scaling factor used if in z rotation mode. "Maximum Z rotation:" the maximum amount of z rotation per display cycle. The default values in the dialog box are my values for the house object on a Mac II in single Finder. I am sure they are not optimal. If you are going to use the companion rotation experiment application, you might want to tune the E, T & W parameters here and enter them in the experiment application. 4. Where am I? Comments are welcomed. I can be reached by: internet: chen@apple.com AppleLink: CHEN.M mail: 20525 Mariani Ave, MS 76-3H Cupertino, CA 95014 Sept 1989 P.S. Both programs are copyrighted but may be distributed freely. If you like the program, why not make a $5 donation to your favorite charity. Michael Chen ATG / Human Interface Group, Apple Computer, Inc.